package com.twu.biblioteca.movies;

public class Movie {

    public enum RATING{
        ONE {
            @Override
            public String toString() {
                return "1";
            }
        }, TWO {
            @Override
            public String toString() {
                return "2";
            }
        }, THREE {
            @Override
            public String toString() {
                return "3";
            }
        }, FOUR {
            @Override
            public String toString() {
                return "4";
            }
        }, FIVE {
            @Override
            public String toString() {
                return "5";
            }
        }, SIX {
            @Override
            public String toString() {
                return "6";
            }
        }, SEVEN {
            @Override
            public String toString() {
                return "7";
            }
        }, EIGHT {
            @Override
            public String toString() {
                return "8";
            }
        }, NINE {
            @Override
            public String toString() {
                return "9";
            }
        }, NONE {
            @Override
            public String toString() {
                return "N/A";
            }
        };

        @Override
        public abstract String toString();
    }

    private String title;
    private String director;
    private String year;
    private RATING rating;

    public Movie(String title, String director, String year, RATING rating) {
        this.title = title;
        this.director = director;
        this.year = year;
        this.rating = rating;
    }

    public boolean is(String movieTitle) {
        return this.title.equals(movieTitle);
    }

    @Override
    public String toString(){
        return this.title + "\t" + this.director + "\t" + this.year + "\t" + this.rating.toString();
    }
}
